<?php
/**
 * Description of FieldEqualSpecification
 *
 * @author welcome
 */
class FieldNotEqualSpecification  extends BaseSpecification{

    private $value;//Expense list
    /**
     * Construct
     * @param type $field
     * @param type $expense
     */
    public function __construct($field,$value) {
        $this->value = $value;
        $this->field = $field;
    }
    /**
     * Return the result of Equal comperation
     * @param type $expenses
     * @return boolean
     */
    public function isSatistifiedBy($expenses = array()) {
        $bRet = false;
        foreach($expenses as $expense)
        {
            if($expense->get($this->field) != $this->value)
            {
                $bRet = true;
                break;
            }
        }
        return $bRet;
    }
}
